package com.travel.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.travel.entity.Hotel;
import com.travel.mapper.HotelMapper;
import com.travel.service.HotelService;

@Transactional
@Service
public class HotelServiceImpl extends ServiceImpl<HotelMapper, Hotel> implements HotelService{

	 @Autowired
	 HotelMapper dao;

	@Override
	public List<Hotel> getHotels(Page<Hotel> page, Hotel view) {
		  page.setRecords(dao.getHotels(page,view));
	      return page.getRecords();
	}
	
}
